<template>
	<div>
		<svg aria-hidden="true" :style="getStyle">
			<use :xlink:href="`#${iconName}`" :fill="fill" />
		</svg>
	</div>
</template>
<script lang="ts" setup>
	import { defineProps, computed } from 'vue';
	import '@/utils/iconfont.js';
	const props = defineProps({
		iconName: {
			type: String,
			required: true,
		},
		w: {
			type: [String, Number],
			default: '40',
		},
		h: {
			type: [String, Number],
			default: '40',
		},
		fill: {
			type: String,
			default: '',
		},
	});
	let getStyle = computed(() => {
		let styleMap = {
			width: `${props.w}px`,
			height: `${props.h}px`,
		};
		return styleMap;
	});
</script>
